import request from './index.js'

/**
 * 用户名/密码登录
 * @param {Object} user
 */
export function login(user) {
	return request.post('/auth/login', user)
}

/**
 * token登录
 */
export function authLogin() {
	return request.get('/auth/authLogin')
}

/**
 * 用户注册
 * @param {Object} user
 */
export function register(user) {
	return request.post('/user', user)
}
